<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div type="button" id="btn"
        style="background-color: beige;height: 100px;width: 100px;text-align: center;vertical-align: center;">
        <a href="wwww.baidu.com" id="bd">百度</a>
    </div>
    <script>
        var ele = document.querySelector("#btn");
        console.log(ele);
        ele.addEventListener("click", function (e) {
            console.log("div");
            console.log(e);
            for (let o in e) {
                if (typeof e[o] === "function")
                    console.log(e[o]);
            }
            console.log(e.getModifierState("Alt"));
        });
        document.querySelector("#bd").addEventListener("click", function (e) {
            console.log("bd");
            e.preventDefault();
            e.stopPropagation();
        });
    </script>
</body>

</html>